package com.bestv.search.common.dataSource;

import org.springframework.jdbc.datasource.lookup.AbstractRoutingDataSource;

import java.sql.SQLException;
import java.sql.SQLFeatureNotSupportedException;
import java.util.logging.Logger;

public class DynamicDataSource extends AbstractRoutingDataSource {
    protected Object determineCurrentLookupKey() {
        DataSourceKey key = DataSourceContextHolder.getDataSourceKey();
        return key;
    }

    public boolean isWrapperFor(Class<?> arg) throws SQLException {
        return false;
    }

    public <T> T unwrap(Class<T> arg) throws SQLException {
        return null;
    }

    public Logger getParentLogger() throws SQLFeatureNotSupportedException {
        return null;
    }
}